<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:s="http://jboss.com/products/seam/taglib"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:rich="http://richfaces.org/rich"
                template="layout/template.xhtml">

    <ui:define name="body">

        <h:messages globalOnly="true" styleClass="message"/>

        <h:form id="traitForm">

            <rich:panel>
                <f:facet name="header">#{messages['trait.label']}</f:facet>

                <s:decorate id="numberDecoration" template="layout/display.xhtml">
                    <ui:define name="label">#{messages['trait.number']}</ui:define>
                    #{traitHome.instance.number}
                </s:decorate>
                <s:decorate id="nameDecoration" template="layout/display.xhtml">
                    <ui:define name="label">#{messages['trait.name']}</ui:define>
                    #{traitHome.instance.name}
                </s:decorate>
                <s:decorate id="failsDecoration" template="layout/display.xhtml">
                    <ui:define name="label">#{messages['trait.failsexpectations']}</ui:define>
                    #{traitHome.instance.failsExpectations}
                </s:decorate>
                <s:decorate id="meetsDecoration" template="layout/display.xhtml">
                    <ui:define name="label">#{messages['trait.meetsexpectations']}</ui:define>
                    #{traitHome.instance.meetsExpectations}
                </s:decorate>
                <s:decorate id="exceedsDecoration" template="layout/display.xhtml">
                    <ui:define name="label">#{messages['trait.exceedsexpectations']}</ui:define>
                    #{traitHome.instance.exceedsExpectations}
                </s:decorate>
                <div style="clear:both"/>

            </rich:panel>

            <div class="actionButtons">
                <s:button view="/traitEdit.xhtml"
                          id="edit"
                          value="#{messages['button.edit']}"/>
                <s:button view="/#{empty traitFrom ? 'traitList' : traitFrom}.xhtml"
                          id="done"
                          value="#{messages['button.done']}"/>
            </div>

        </h:form>

    </ui:define>

</ui:composition>

